<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateRecruitmentImg extends Migration{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up(){
        /**
         * 招聘会图片表
         */
        Schema::create('recruitment_img', function(Blueprint $table){
            $table->engine = 'MyISAM';
            $table->increments('id')->unsigned()->comment('自动增长主键');
            $table->integer('recruitment_id')->index('recruitment_id')->unsigned()->default(0)->comment('所属招聘会id');
            $table->string('img_url', 100)->default('')->comment('招聘会图片');
            $table->tinyInteger('img_state')->unsigned()->default(0)->comment('图标类型(0代表沉余图片1代表上传图片)');
            $table->string('img_tag', 100)->default('')->comment('跟踪招聘会的标记');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down(){
        Schema::drop('recruitment_img');
    }
}
